﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using TinyPMS_Jerusalem.Models.Validation;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace TinyPMS_Jerusalem.Models.DBModel
{
    #region Validation

    [MetadataType(typeof(CommentMetadata))]
    public partial class Comment
    {
        [Bind(Exclude = "ID,PropertyID")]
        public class CommentMetadata
        {
            [ScaffoldColumn(false)]
            public object ID { get; set; }

            [ScaffoldColumn(false)]
            public object PropertyID { get; set; }

            //什么敏感内容，囧~
            [CommentMustNotContainFilteredWords(ErrorMessage = "您的评论含有敏感内容，请检查")]
            public object CommentContent { get; set; }

            public object UserName { get; set; }
        }
    }

    #endregion
}